﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QYmall.Core.Model.Models
{
    /// <summary>
    /// 订单促销活动
    /// </summary>
    public class OrderPromotion
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        [Display(Name = "所属订单")]
        [ForeignKey("Order")]
        public long OrderId { get; set; }

        /// <summary>
        /// 促销活动ID
        /// </summary>
        [Display(Name = "促销活动")]
        [ForeignKey("Promotion")]
        public long PromotionId { get; set; }


        /// <summary>
        /// 订单信息
        /// </summary>
        public Orders? Order { get; set; }

        /// <summary>
        /// 促销活动信息
        /// </summary>
        public ShopPromotion? Promotion { get; set; }
    }
}
